home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 63 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.3 KB

  1. Path: news1.h1.usa.pipeline.com!usenet
  2. From: grantp@usa.pipeline.com(Pete)
  3. Newsgroups: comp.lang.c
  4. Subject: Re: Reading Directory entries
  5. Date: 1 Jan 1996 12:52:46 GMT
  6. Organization: Kalevi, Inc
  7. Message-ID: <4c8leu$5de@news1.usa.pipeline.com>
  8. NNTP-Posting-Host: pipe5.h1.usa.pipeline.com
  9. X-PipeUser: grantp
  10. X-PipeHub: usa.pipeline.com
  11. X-PipeGCOS: (Pete)
  12. X-Newsreader: Pipeline USA v3.3.0
  13.  
  14. On Jan 01, 1996 07:40:32 in article <Reading Directory entries>,
  15. '100243.2060@compuserve.com (PXH)' wrote: 
  16.  
  17.  
  18. >Hi, 
  19. >I am just starting out in the world of C programming so can someone 
  20. >help me with this probably basic question - 
  21. >How do I read a directory, and determine whether the entries are files 
  22. >or directories... I have used readdir, but this doesn't seem to 
  23. >differentiate between the two.  In short I'm trying to write a program 
  24. >that "walks" a directory structure (under dos). 
  25.  
  26. Directory (file system) processing is a function of the operating  
  27. system, not of the C language.  Furthermore, compiler vendors do 
  28. not provide exactly the same library functions.  Since you are working 
  29. under DOS, look into: 
  30.     findfirst(),  findnext() 
  31.     _findfirsr(), _findnext() 
  32.    _dos_findfirst(), _dos_findnext() 
  33. pairs depending on the compiler you have.  Borland's products 
  34. use the first pair. 
  35. -- 
  36.  
  37. Pete 
  38.  
  39.  
  40.  
  41.  
  42.  
  43.